// 第三方应用管理
export const ThirdPartyThead = [
  {
    type: 'selection',
    width: 60,
    align: 'center'
  },
  {
    title: '应用名称',
    key: 'name'
  },
  {
    title: 'ClientId',
    key: 'clientId'
  },
  {
    title: 'Secret',
    key: 'clientSecret'
  },
  {
    title: '回调地址',
    key: 'callbackUrl'
  },
  {
    title: '操作',
    width: 240,
    align: 'center',
    key: 'action',
    slot: 'action'
  }
]

// 第三方应用管理详情
export const ThirdPartyDetailThead = [
  // {
  //   type: 'selection',
  //   width: 60,
  //   align: 'center'
  // },
  {
    title: '账号名称',
    key: 'name'
  },
  {
    title: '登录名称',
    key: 'userName'
  },
  {
    title: '授权时间',
    key: 'authorizeOn',
    render: (h, params) => {
      let row = params.row
      let times = ''
      if (row.authorizeOn) {
        times = row.authorizeOn.slice(0, 19).replace(/T/g, ' ')
      }
      return h('span', times)
    }
  },
  {
    title: '状态',
    key: 'enabled',
    render: (h, params) => {
      const text = params.row.enabled ? '启用' : '禁用'
      return h('span', text)
    }
  }
]
